<template>
    
        <section class="chart">
            <el-row>
                <el-col :span="9">
                    <template>
                        <el-table

                            ref="multipleTable"
                            :data="countData"
                            border
                            tooltip-effect="dark"
                            style="width: 100%;margin-top:20px;"
                            @selection-change="handleSelectionChange">
                            <el-table-column
                                type="selection"
                                width="55">
                            </el-table-column>
                            <el-table-column
                                label="试卷类型"
                                align="center">
                                <template scope="scope">{{ formatterType(scope.row.type) }}</template>
                            </el-table-column>
                            <el-table-column
                                label="答卷用户数"                                
                                align="center"
                                width="140">
                                <template scope="scope">{{ scope.row.count }}</template>
                            </el-table-column>
                        </el-table>
                        <div style="margin-top: 20px;margin-left:40px;">
                            <el-button type="primary"  @click="downloadExl()">导出</el-button>
                            <a href="" :download="downloadName" id="hf"></a>
                            <el-button type="primary" @click="updateSelectType()">选择试卷类型并重新生成报表</el-button>
                        </div>
                    </template>
                </el-col>

                <el-col :span="12" :offset="3">
                    <div id="chartColumn" style="width:100%; height:400px;"></div>
                </el-col>

                <el-col :span="12" style="margin-top:20px;">
                    <div id="chartPie" style="width:100%; height:400px;" ></div>
                </el-col>
                
            </el-row>
        </section>
   
</template>
<script>
    import EchartsJs from './Echarts.js';
    module.exports=EchartsJs;
</script>
<style scoped>
    
</style>
